#include<stdio.h>
int main()
{
    int n,m,sum=0;
    scanf("%d",&n);
    m=n;
    while(m!=0)
    {
        sum=sum+m%10;
        m/=10;
    }
    if(n%sum==0)
    printf("Yes");
    else
    printf("No");
    return 0;
}